using PPI.Entities.Lookup;
using System;

namespace PPI.Entities.Distribution
{
    public class EPhase : ELookupBase
    {
        public Int32 ServerId { get; set; }

        public EPhase(int id, string name) : this(id)
        {
            Name = name;
        }

        public EPhase(int id) : this()
        {
            Id = id;
        }

        public EPhase()
        {
            Key = "PhasesLookup";
            Id = Int32.MinValue;
            ServerId = Int32.MinValue;
        }

        public override bool Equals(object obj)
        {
            if (obj is EPhase)
            {
                EPhase tmpObj = (EPhase)obj;

                return (Id.ToString().Equals(tmpObj.Key));
            }

            return base.Equals(obj);
        }
    }
}